package utils;

import java.math.BigInteger;
import java.util.Iterator;

public class BigFibiterator implements Iterator<BigInteger>{
	private BigInteger a = BigInteger.ZERO;
	private BigInteger b = BigInteger.ONE;
	
	@Override
	public boolean hasNext() {
		return true;
	}

	@Override
	public BigInteger next() {
		BigInteger c = a.add(b);
		a = b;
		b = c;
		return a;
	}

	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}
}
